/**
 * 功能描述
 */

define(function (require, exports, module) {
	var Grid = require("grid");
	var transferNotes = require("../store/transferNotes");
    var instance = {
        initComponent: function (params,widget) {
        	var showGrid = new Grid({
        		parentNode:".J-grid-show",
        		autoRender : false,
        		url:"api/certificatestransfer/queryNotess",
        		/*params:function(){
        			var subnav = widget.get("subnav");
        			return {
        					"operateDate":subnav.getValue("operateDate").start,
        					"operateDateEnd":subnav.getValue("operateDate").end,
        					fetchProperties:transferNotes.fetchProperties,
        			}
        		},*/
        		model:{

        			columns:[{
        				name:"operateDate",
        				format:"date",
        				label:"转让时间"
        			},{
        				name:"assignor",
        				label:"转让人"
        			},{
        				name:"receiver",
        				label:"受让人"
        			},{
        				name:"transferType",
        				label:"转让类别",
        				format:function(transferType){
        					if(transferType!=null){
        						if(transferType=="Transfer"){
            						return "转让"
            					}else if(transferType=="Inherit"){
            						return "继承"
            					}else{
            						return "赠与"
            					}
        					}else{
        						return null
        					}
        					
        				}
        			},{
        				name:"balance",
        				label:"权证余额",
        				format:function(val){
        						return Number(val).toFixed(2);
        				}
        			},{
        				name:"welfarebalance",
        				label:"消费券余额",
        				format:function(val){
        					return Number(val).toFixed(2);
        				}
        			},{
        				name:"remark",
        				label:"备注"
        			},{
        				name:"operater",
        				label:"经办人"
        			},]
        		}
        	})
        	widget.set("showGrid", showGrid);
        }
    };
    module.exports = instance;
});
